/*
 *  TODOS LOS DERECHOS RESERVADOS PARA LOS DESARROLLADORES DEL PROYECTO jTuringMachine.
 *   
 *  Copyright (C) 2009  SystarSystems.
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or 
 *  any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see http://www.gnu.org/licenses/.
 * 
 * 
 */

package com.jturingmachinele.visual;

import java.awt.Dimension;

/**
 *
 * @author jsandoval
 */
public class AcercaDe extends javax.swing.JDialog {

    /** Creates new form AcercaDe */
    public AcercaDe(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo(parent);
        setMinimumSize(new Dimension(435, 376));
        setMaximumSize(new Dimension(435, 376));
        setPreferredSize(new Dimension(435, 376));
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlNorte = new javax.swing.JPanel();
        lblImagen = new javax.swing.JLabel();
        pnlSur = new javax.swing.JPanel();
        btnCerrar = new javax.swing.JButton();
        pnlCentro = new javax.swing.JPanel();
        lblAcercaDe = new javax.swing.JLabel();
        pnlLimiteCentroIz = new javax.swing.JPanel();
        pnlLimiteCentroDer = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Acerca de...");
        setMinimumSize(new java.awt.Dimension(435, 376));
        setResizable(false);

        pnlNorte.setMaximumSize(new java.awt.Dimension(435, 100));
        pnlNorte.setMinimumSize(new java.awt.Dimension(435, 100));
        pnlNorte.setLayout(new java.awt.BorderLayout());

        lblImagen.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblImagen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jturingmachinele/visual/img/banner_jtm.png"))); // NOI18N
        pnlNorte.add(lblImagen, java.awt.BorderLayout.CENTER);

        getContentPane().add(pnlNorte, java.awt.BorderLayout.PAGE_START);

        pnlSur.setMaximumSize(new java.awt.Dimension(435, 50));
        pnlSur.setMinimumSize(new java.awt.Dimension(435, 50));
        pnlSur.setPreferredSize(new java.awt.Dimension(521, 50));

        btnCerrar.setMnemonic('C');
        btnCerrar.setText("Cerrar");
        btnCerrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlSurLayout = new javax.swing.GroupLayout(pnlSur);
        pnlSur.setLayout(pnlSurLayout);
        pnlSurLayout.setHorizontalGroup(
            pnlSurLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlSurLayout.createSequentialGroup()
                .addContainerGap(229, Short.MAX_VALUE)
                .addComponent(btnCerrar)
                .addGap(227, 227, 227))
        );
        pnlSurLayout.setVerticalGroup(
            pnlSurLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSurLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnCerrar)
                .addContainerGap(16, Short.MAX_VALUE))
        );

        getContentPane().add(pnlSur, java.awt.BorderLayout.PAGE_END);

        pnlCentro.setLayout(new java.awt.BorderLayout());

        lblAcercaDe.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblAcercaDe.setText("<html>\n\t\n\t<center<h3>jTuringMachine</h3></center>\n\t<justify><p>\n\t\tjTuringMachine es un proyecto realizádo para modelar gráficamente\n\t\tmáquinas de Turing mediante grafos. jTuringMachine está licenciado\n\t\tbajo la <a href=\"http://www.mozilla.org/MPL/\">Mozilla Public License 1.1</a>\n\t\ty el sitio del proyecto está alojado en <a href=\"http://www.mozilla.org/MPL/\">http://code.google.com/p/jturingmachinele/</a>.<br/><br/>\n\t\tLa principal motivación del desarrollo del proyecto es más que nada educativo y se pretende\n\t\tque las demás personas aprendan del código y utilizen la herramienta.<br/><br/>\n\t\tLa utilización del código es completa y totalmente libre, solo se pide indicar\n\t\tel nombre de los desarrolladores.\n\t</justify></p>\n\t\n<html>");
        lblAcercaDe.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        lblAcercaDe.setMaximumSize(new java.awt.Dimension(435, 200));
        lblAcercaDe.setMinimumSize(new java.awt.Dimension(435, 200));
        lblAcercaDe.setPreferredSize(new java.awt.Dimension(435, 200));
        lblAcercaDe.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        pnlCentro.add(lblAcercaDe, java.awt.BorderLayout.CENTER);

        javax.swing.GroupLayout pnlLimiteCentroIzLayout = new javax.swing.GroupLayout(pnlLimiteCentroIz);
        pnlLimiteCentroIz.setLayout(pnlLimiteCentroIzLayout);
        pnlLimiteCentroIzLayout.setHorizontalGroup(
            pnlLimiteCentroIzLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );
        pnlLimiteCentroIzLayout.setVerticalGroup(
            pnlLimiteCentroIzLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 226, Short.MAX_VALUE)
        );

        pnlCentro.add(pnlLimiteCentroIz, java.awt.BorderLayout.LINE_START);

        javax.swing.GroupLayout pnlLimiteCentroDerLayout = new javax.swing.GroupLayout(pnlLimiteCentroDer);
        pnlLimiteCentroDer.setLayout(pnlLimiteCentroDerLayout);
        pnlLimiteCentroDerLayout.setHorizontalGroup(
            pnlLimiteCentroDerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 35, Short.MAX_VALUE)
        );
        pnlLimiteCentroDerLayout.setVerticalGroup(
            pnlLimiteCentroDerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 226, Short.MAX_VALUE)
        );

        pnlCentro.add(pnlLimiteCentroDer, java.awt.BorderLayout.LINE_END);
        pnlCentro.add(jSeparator1, java.awt.BorderLayout.PAGE_END);

        getContentPane().add(pnlCentro, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarActionPerformed
        dispose();
    }//GEN-LAST:event_btnCerrarActionPerformed

    /**
    * @param args the command line arguments
    */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            public void run() {
//                AcercaDe dialog = new AcercaDe(new javax.swing.JFrame(), true);
//                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
//                    public void windowClosing(java.awt.event.WindowEvent e) {
//                        System.exit(0);
//                    }
//                });
//                dialog.setVisible(true);
//            }
//        });
//    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCerrar;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel lblAcercaDe;
    private javax.swing.JLabel lblImagen;
    private javax.swing.JPanel pnlCentro;
    private javax.swing.JPanel pnlLimiteCentroDer;
    private javax.swing.JPanel pnlLimiteCentroIz;
    private javax.swing.JPanel pnlNorte;
    private javax.swing.JPanel pnlSur;
    // End of variables declaration//GEN-END:variables

}
